<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <include file="./Public/Tpl/head.html" title="店铺首页" description="药品管理系统." keywords="中南民族大学,药品管理系统"/>
</head>
<body>
<include file="./Public/Tpl/nav.html"/>
<div class="container">
  <div class="col-md-10">
    <div class="panel panel-default">
      <div class="panel-heading">药店总览</div>
      <div class="panel-body">
        <div class="row">
          <div class="col-sm-12">
            <h4 class="text-primary">店铺相关:</h4>
            <div class="col-sm-3 text-info">
              职工数: {$user.total}人
            </div>
            <div class="col-sm-3 text-success">
              管理员: {$user.admin}人
            </div>
            <div class="col-sm-3 text-warning">
              最近(1小时)登录: {$user.recent}人
            </div>
          </div>
        </div>
        <hr />
        <div class="row">
          <div class="col-sm-12">
            <h4 class="text-primary">药品相关:</h4>
            <div class="col-sm-3 text-info">
              总数: {$drug.total}种
            </div>
            <div class="col-sm-3 text-success">
              已入库: {$drug.stock}种
            </div>
            <div class="col-sm-3 text-warning" data-toggle="modal" data-target="#out_stockModal">
              <span data-toggle="tooltip" title="点我来查看!" role="button">未入库: {:count($drug['out_stock'])}种</span>
            </div>
            <div class="col-sm-3 text-danger" data-toggle="modal" data-target="#warningModal">
              <span data-toggle="tooltip" title="点我来查看!" role="button">库存警告: {:count($drug['warning'])}件</span>
            </div>
          </div>
        </div>
        <hr/>
        <div class="row">
          <div class="col-sm-12">
            <h4 class="text-primary">销售相关:</h4>
            <div class="col-sm-3 text-success">
              销售额: {$sell.sell_money}元
            </div>
            <div class="col-sm-3 text-info">
              总销售: {$sell.total}件
            </div>
            <div class="col-sm-3 text-warning">
              退货: {$sell.return}件
            </div>
            <div class="col-sm-3 text-danger">
              总退款: {$sell.ret_money}元
            </div>
            <div class="col-sm-3 text-warning">
              实际销售额: {$sell.real_money}元
            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-3">
            ...
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="col-md-2">
    <div class="panel panel-default">
      <div class="panel-heading">公告:</div>
      <div class="panel-body">
        暂无...
      </div>
    </div>
  </div>
  <!-- OutStock Modal -->
  <div class="modal fade bs-example-modal-sm" id="out_stockModal" tabindex="-1" role="dialog" aria-labelledby="outStockModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="outStockModalLabel">未入库列表<small>(右侧气泡为低限数)</small></h4>
        </div>
        <div class="modal-body">
          <ul class="list-group">
            <volist name="drug.out_stock" id="data">
              <li class="list-group-item">
                <span class="badge">{$data.lowwarning}</span>
                {$data.pinyinma} - {$data.name} - {$data.spec}
              </li>
            </volist>
          </ul>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
    </div>
  </div>
  <!-- Warning Modal -->
  <div class="modal fade bs-example-modal-sm" id="warningModal" tabindex="-1" role="dialog" aria-labelledby="warningModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="warningModalLabel">警告列表<small>(右侧气泡为低限数)</small></h4>
        </div>
        <div class="modal-body">
          <ul class="list-group">
            <volist name="drug.warning" id="data">
              <li class="list-group-item">
                <span class="badge">{$data.lowwarning}</span>
                {$data.name} (库存: {$data.sum_amount} 件)
              </li>
            </volist>
          </ul>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
    </div>
  </div>
</div>
<include file="./Public/Tpl/footer.html"/>
</body>
</html>